﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Classifiers.aspx.cs" Inherits="Classifiers" %>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<h4 class="page_title">Clasificatoare</h4>
<div class="hr dotted clearfix">&nbsp;</div>
    <asp:Panel ID="classifierTypesPanel" runat="server" Visible="False">
       
        <asp:Button ID="classifierTypesNewClassifierTypeButton" runat="server" Text="New Classifier Type"  Width="176px" 
            onclick="classifierTypesNewClassifierTypeButton_Click" CssClass="button" />
        <br />
        
        <asp:GridView ID="classifierTypesGridView" runat="server" 
            CellPadding="10" 
            EnableModelValidation="True" 
            HorizontalAlign="Justify" 
            AutoGenerateColumns="False" 
            CssClass="mGrid"
            PagerStyle-CssClass="pgr"
            AlternatingRowStyle-CssClass="alt"
            Width="100%" 
            AllowPaging="True"         
            onrowediting="classifierTypesGridEditButton_Click" 
            onpageindexchanging="classifierTypesGridView_PageIndexChanging" PageSize="4" >
            
            <Columns>
                <asp:BoundField DataField="Type ID"       HeaderText="Type ID"          HtmlEncode="False"   HeaderStyle-CssClass="hideGridColumn" ItemStyle-CssClass = "hideGridColumn"  />  
                <asp:BoundField DataField="Name"          HeaderText="Name"             HtmlEncode="False" />
                <asp:BoundField DataField="Parent Name"   HeaderText="Parent" />             
                <asp:ButtonField ButtonType="Button" CommandName="Edit" Text="Edit" ControlStyle-CssClass="button" />
            </Columns>           
        </asp:GridView>

    </asp:Panel>

    <asp:Panel ID="addNewClassifierTypePanel" runat="server" Visible="False">
    <div class="contactform rounded">
        <h3><asp:Label  ID="pleaseLoginLabel" runat="server" Text="Adauga tip nou de clasificator"></asp:Label></h3>
        <div class="field">
		    <label for="name"><asp:Label ID="nameClassifierTypeLabel" runat="server" Text="Denumire: " ></asp:Label></label>
		    <asp:TextBox ID="addNewClassifierTypeTextBox" runat="server" CssClass="input"></asp:TextBox>
            <p class="hint">Inserati denumirea.</p>
	    </div>
        <div class="field">
            <label for="parent"><asp:Label ID="parentClassifierTypeLabel" runat="server" Text="Clasificator superior: "></asp:Label></label>
            <asp:DropDownList ID="parentClassifierTypeDropDownList" runat="server" CssClass="input"></asp:DropDownList>
            <p class="hint">Selectati clasificator superior.</p>
        </div>
        <asp:Button ID="addNewClassifierTypeSaveButton" runat="server" Text="Save" onclick="addNewClassifierTypeSaveButton_Click"  CssClass="buttonForm" />
        <asp:Button ID="addNewClassifierTypeCancelButton" runat="server" Text="Cancel" onclick="addNewClassifierTypeCancelButton_Click"  CssClass="buttonForm" />    
     </div>                
    </asp:Panel>
 	
    <asp:Panel ID="editClassifierTypePanel" runat="server" Visible="False">
    <div class="contactform rounded">
        <h3><asp:Label  ID="Label21" runat="server" Text="Editare tip clasificator"></asp:Label></h3>
        <div class="field">
            <label for="editTypeID"><asp:Label ID="typeIDLabel" runat="server" Text="Classifier type ID: " ></asp:Label></label>
		    <asp:Label ID="editClassifierTypeIDLabel" runat="server" Text="" CssClass="input"></asp:Label>
            <p class="hint">TypeID clasificator.</p>
        </div>
        <div class="field">
            <label for="editNameClassifierType"><asp:Label ID="editNameClassifierTypeLable" runat="server" Text="Denumire: " ></asp:Label></label>
            <asp:TextBox ID="editClassifierTypeDenumireaTextBox" runat="server" CssClass="input"></asp:TextBox>
            <p class="hint">Inserati denumirea.</p>
        </div>
        <div class="field">
            <label for="editParentClassifierTypeID"><asp:Label ID="editParentClassifierTypeIDLabel" runat="server" Text="Clasificator superior: "></asp:Label></label>
            <asp:DropDownList ID="editParentClassifierTypeDropDownList" runat="server" CssClass="input"></asp:DropDownList>
            <p class="hint">Selectati clasificator superior.</p>
        </div>
        <asp:Button ID="editClassifierTypeSaveButton" runat="server" Text="Save" onclick="editClassifierTypeSaveButton_Click"  CssClass="buttonForm" />
        <asp:Button ID="editClassifierTypeCancelButton" runat="server" Text="Cancel" onclick="editClassifierTypeCancelButton_Click"  CssClass="buttonForm" />   
    </div>                   
    </asp:Panel>

        <asp:Panel ID="classifiersPanel" runat="server" Visible="False">
        <asp:Button ID="classifiersNewClassifierButton" runat="server" Text="New Classifier"  Width="137px" onclick="classifiersPanelNewClassifierButton_Click" CssClass="button" />
        <hr />
        <asp:DropDownList ID="classifiersTypesDDL" runat="server" AutoPostBack="true" onselectedindexchanged="classifiersTypesDDL_SelectedIndexChanged">   </asp:DropDownList>
        <hr />
        <asp:GridView ID="classifiersPanelGridView" runat="server" 
            CellPadding="4" 
            EnableModelValidation="True" 
            HorizontalAlign="Justify" 
            AutoGenerateColumns="False" 
            CssClass="mGrid"
            PagerStyle-CssClass="pgr"
            AlternatingRowStyle-CssClass="alt"
            Width="100%" 
            AllowPaging="True"         
            onrowediting="classifiersPanelGridEditButton_Click" 
                onpageindexchanging="classifiersPanelGridView_PageIndexChanging" >
            
            <Columns>
                <asp:BoundField DataField="Type ID"     HeaderText="Type ID"          HtmlEncode="False"  HeaderStyle-CssClass="hideGridColumn" ItemStyle-CssClass = "hideGridColumn"  />  
                <asp:BoundField DataField="Code"        HeaderText="Code"             HtmlEncode="False"  HeaderStyle-CssClass="hideGridColumn" ItemStyle-CssClass = "hideGridColumn" /> 
                <asp:BoundField DataField="Name"        HeaderText="Name"             HtmlEncode="False" />  
                <asp:BoundField DataField="Parent Name" HeaderText="Subordonat" />             
                <asp:ButtonField ButtonType="Button" CommandName="Edit" Text="Edit" ControlStyle-CssClass="button" />
            </Columns>           
        </asp:GridView>

    </asp:Panel>

    <asp:Panel ID="addNewClassifierPanel" runat="server" Visible="False">
    <div class="contactform rounded">
    <h3><asp:Label ID="addNewClassifierFormLabel" runat="server" text="Adauga clasificator nou"></asp:Label></h3>
    <div class="field">
            <label for="addNewClassifier1"><asp:Label ID="addNewTypeClassifiersLabel" runat="server" Text="Tipul Clasificatorului: " ></asp:Label></label>
		    <asp:DropDownList ID="addNewClassifierClassifierTypeDDL" runat="server" CssClass="input" AutoPostBack="True" onselectedindexchanged="addNewClassifierClassifierTypeDDL_SelectedIndexChanged"></asp:DropDownList>
            <p class="hint">Selectati tipul clasificatorului.</p>
    </div>
    <div class="field">
            <label for="addNewClassifier2"><asp:Label ID="addNewParentClassifier" runat="server" Text="Superiorul: " ></asp:Label></label>
		    <asp:DropDownList ID="addNewParentClassifierDropDownList" runat="server" CssClass="input"></asp:DropDownList>
            <p class="hint">Selectati clasificatorul superiod.</p>
    </div>
    <div class="field">
            <label for="addNewClassifier3"><asp:Label ID="addNewClassifierNameLabel" runat="server" Text="Descrirerea: " ></asp:Label></label>
            <asp:TextBox ID="addNewClassifierNameTextBox" runat="server" CssClass="input"></asp:TextBox>
            <p class="hint">Inserati denumirea.</p>
    </div>
    <asp:Button ID="addNewClassifierSaveButton" runat="server" Text="Save" onclick="addNewClassifierSaveButton_Click"  CssClass="buttonForm" />
    <asp:Button ID="addNewClassifierCancelButton" runat="server" Text="Cancel" onclick="addNewClassifierCancelButton_Click"  CssClass="buttonForm" />  
   </div>                     
   
   </asp:Panel>

    <asp:Panel ID="editClassifierPanel" runat="server" Visible="False">
    <div class="contactform rounded">
    <h3><asp:Label ID="editClassifierFormLabel" runat="server" Text="Editare clasificator"></asp:Label></h3>
        <div class="field">         
            <label for="editClassifier1"><asp:Label ID="Label44" runat="server" Text="Tipul Clasificatorului: " ></asp:Label></label>
		    <asp:DropDownList ID="editClassifierTypeOfClassifierDDL" runat="server" CssClass="input" Enabled="false"></asp:DropDownList>
            <p class="hint">Clasificatorului.</p>
        </div>
        <div class="field">
            <label for="editClassifier2"><asp:Label ID="Label1113" runat="server" Text="Codul clasificatorului: " ></asp:Label></label>
            <asp:Label ID="editClassifierCodeLabel" runat="server" Text="" CssClass="input"></asp:Label>
            <p class="hint">Codul clasificatorului.</p>
        </div>
        <div class="field">
            <label for="editClassifier3"><asp:Label ID="Label114" runat="server" Text="Descrirerea: " ></asp:Label></label>
            <asp:TextBox ID="editClassifierNameTextBox" runat="server" CssClass="input"></asp:TextBox>
            <p class="hint">Nume clasificatorului.</p>
        </div>
        <asp:Button ID="editClassifierSaveButton" runat="server" Text="Save" onclick="editClassifierSaveButton_Click"  CssClass="buttonForm" />
        <asp:Button ID="editClassifierCancelButton" runat="server" Text="Cancel" onclick="editClassifierCancelButton_Click"  CssClass="buttonForm" /> 
    </div>                     
    </asp:Panel>
</asp:Content>

